package com.zik.vod.controller;

import com.zik.swagger.result.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;

/**
 * @author: zik_zhou
 * @Date: 2023-04-22 22:51
 * @Operation:
 * @Description: 用户登录接口
 **/
@Slf4j
@RestController
@RequestMapping("/admin/vod/user")
public class UserLoginController {
    /**
     * 登录接口
     * @return
     */
    @PostMapping("login")
    public Result login() {
        log.info("login---------------");
        HashMap<String, Object> map = new HashMap<>();
        map.put("token","admin-token");
        return Result.ok(map);
    }

    /**
     * 获取当前用户信息
     * @return map 用户基本信息
     */
    @GetMapping("info")
    public Result info() {
        HashMap<String, Object> map = new HashMap<>();
        map.put("roles","admin");
        map.put("introduction","I am a super administrator");
        map.put("avatar","https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif");
        map.put("name","Super Admin");
        return Result.ok(map);
    }
}
